package com.jxbeidou.system.api.user;

import cn.hutool.core.lang.UUID;
import cn.hutool.core.lang.generator.UUIDGenerator;
import com.jxbeidou.core.entity.R;
import com.jxbeidou.core.entity.SecurityUserVO;
import com.jxbeidou.system.api.conts.ApiConstants;
import com.jxbeidou.system.api.user.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @program: jxbeidou-basic
 * @ClassName: UserApi
 * @description: 用户管理接口
 * @author: 杜晓祥
 * @create: 2023-12-22 09:16
 * 版权所有：交信北斗(北京)信息科技有些公司
 */
@FeignClient(name = ApiConstants.SYSTEM_NAME, contextId = UserApi.CONTEXT_ID)
@Component
public interface UserApi {

    String CONTEXT_ID = "user-api";
    String PREFIX = ApiConstants.API_PREFIX + "/sys/user";

    @GetMapping(PREFIX + "/findByUsername")
    R<SecurityUserVO> findByUsername (@RequestParam("username") String username);

    @GetMapping(PREFIX + "/selectByUsername")
    R<UserDTO> selectByUsername (@RequestParam("username") String username);

}
